package insight.miescor.opp.domain;

import java.util.Date;

import org.sormula.Database;
import org.sormula.SormulaException;
import org.sormula.Table;

public class Activity {
	private int id;
	private Date completedon;
	private String completedby;
	private String status;
	private String itemid;

	public Activity() {

	}
	
	public Activity(Date completedon, String completedby, String status, String itemid) {
		this.completedon=completedon;
		this.completedby=completedby;
		this.status=status;
		this.itemid=itemid;
	}

	public void save(Database database) throws SormulaException {
		Table<Activity> activityTable = database.getTable(Activity.class);
		activityTable.insert(this);
	}

	
	public Date getCompletedon() {
		return completedon;
	}

	public void setCompletedon(Date completedon) {
		this.completedon = completedon;
	}

	public String getCompletedby() {
		return completedby;
	}

	public void setCompletedby(String completedby) {
		this.completedby = completedby;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getItemid() {
		return itemid;
	}

	public void setItemid(String itemid) {
		this.itemid = itemid;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Override
	public String toString() {
		return "Activity [id=" + id + ", completedon=" + completedon
				+ ", completedby=" + completedby + ", status=" + status
				+ ", itemid=" + itemid + "]";
	}
		
	
}
